{extend name="common@portalBase" /}
{block name="content"}
<section class="content">
  <div class="row">
    <div class="col-xs-12">
      <div class="box box-primary">
        <div class="box-header with-border">
          <div class="box-title">考场列表</div>
          <div class="pull-right">
          </div>
        </div>
        <div class="box-body">
          <table id="table" class="table">
            <thead>
            <tr>
              <th>ID</th>
              <th>开始时间</th>
              <th>考试时长</th>
              <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {foreach $rooms as $row}
            <tr>
              <td width="5%">{$row.id}</td>
              <td width="10%">{$row.start_time}</td>
              <td width="10%">{$row.exam_duration}分钟</td>
              <td width="15%">
                {if strtotime($row.start_time)<$nowTimestamp && strtotime($row.end_time)>$nowTimestamp}
                <a href="{:url('room/view',['id'=>$row.id])}" class="btn btn-xs btn-default">参加考试</a>
                {else}
                <span>不在考试时间范围内</span>
                {/if}
              </td>
            </tr>
            {/foreach}
            </tbody>
          </table>
        </div>
        <div class="box-footer">
          {$rooms->render()}
        </div>
      </div>
    </div>
  </div>
</section>
{/block}
{block name="page_script"}

{/block}





